package com.t.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.t.dao.classinfoMapper;
import com.t.pojo.classinfo;
import com.t.service.testService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Administrator on 2018/4/27.
 */
@Service
public class testServiceImpl implements testService {
    @Autowired
    private classinfoMapper ClassinfoMapper;
    @Override
    public int testInt() {
        classinfo ci=new classinfo();
        ci.setId("1");
        ci.setClassname("测试班级");
        int a=ClassinfoMapper.insert(ci);
        return  a;
    }

    @Override
    public int testSelect() {
        PageHelper.startPage(1,2);
        List<classinfo> a= ClassinfoMapper.selectAll();
        PageInfo<classinfo> b= new PageInfo<classinfo>(a);
        return 0;
    }
}
